package com.dmcloud.common.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created by xiaodao
 * date: 2019/10/30
 * 实体类基类
 */
@Data
public class BaseEntity implements Serializable {
    /**
     * 表id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String createBy;
    /**
     * 创建时间
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private LocalDateTime createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String updateBy;
    /**
     * 更新时间
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private LocalDateTime updateTime;
    /**
     * 0:正常 1 删除
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer delFlag;
    /**
     * 备注
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private String remark;
}
